package com.zhny.sensor.dao;


import com.zhny.sensor.entity.BarcodeMachine;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @Author: cmx
 * @Description:
 * @Date: 2020/1/10 11:59
 */
public interface BarcodeMachineDao extends JpaRepository<BarcodeMachine,String>, JpaSpecificationExecutor<BarcodeMachine> {

    @Query(value = "SELECT number from barcode_machine where slaughterHouseId = ?",nativeQuery = true)
    List<String> queryBarcodeMachineIds(String slaughterHouseId);

}
